<#include "/layout/header.ftl" />

<script>
	$(function()
	{
		$("#join_date").calendar(
		{
			dateFormat: "yyyy年mm月dd日"
		});
	});

	var _verify = false;
	var _verify_time = 30;
	var _verify_id = null;
	function verify_click()
	{
		if (_verify)
			return;

		var mobile = $("#txt_mobile").val();
		$.simpleAjax("/app/sms", {mobile: mobile}, function(o)
		{
			_verify = true;
			$.toast("发送成功");
			_verify_id = setInterval(set_verify, 1000);
		});
	}
	function set_verify()
	{
		if (_verify_time > 1)
		{
			var msg = "还剩" + _verify_time + "秒";
			$("#btn_verify").text(msg);
			_verify_time--;
		}
		else
		{
			var msg = "获取验证码";
			$("#btn_verify").text(msg);
			_verify = false;
			clearInterval(_verify_id);
		}
	}

	function reg_click()
	{
		$.toast("注册成功", function()
		{
			window.location = "index.shtml";
		});
	}
</script>

<div class="logo">
	<img src="${rc_path}/images/logo.png">
</div>
<div class="weui-cells__title">帐号信息</div>
<div class="weui-cells weui-cells_form" id="div_form">
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">手机号</label></div>
		<div class="weui-cell__bd">
			<input type="tel" id="txt_mobile" name="mobile" class="weui-input" pattern="[0-9]*" placeholder="请输入手机号" maxlength="20"/>
		</div>
		<div class="weui-cell__ft">
			<button class="weui-vcode-btn" onclick="verify_click()" id="btn_verify">获取验证码</button>
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">验证码</label></div>
		<div class="weui-cell__bd">
			<input class="weui-input" name="__VERIFY__" type="number" placeholder="请输入验证码">
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">密码</label></div>
		<div class="weui-cell__bd">
			<input type="password" name="password" class="weui-input" placeholder="请输入密码" />
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">重复密码</label></div>
		<div class="weui-cell__bd">
			<input type="password" name="password" class="weui-input" placeholder="请重复输入密码" />
		</div>
	</div>
</div>
<div class="weui-cells__title">党员信息</div>
<div class="weui-cells weui-cells_form">
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
		<div class="weui-cell__bd">
			<input type="text" class="weui-input" placeholder="请输入姓名" />
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">身份证号</label></div>
		<div class="weui-cell__bd">
			<input type="text" class="weui-input" placeholder="请输入身份证号" />
		</div>
	</div>
	<div class="weui-cell weui-cell_select weui-cell_select-after">
		<div class="weui-cell__hd">
			<label class="weui-label">党组织</label>
		</div>
		<div class="weui-cell__bd">
			<select class="weui-select" name="select2">
				<option value="1">党组织一</option>
				<option value="2">党组织二</option>
				<option value="3">党组织三</option>
			</select>
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd">
			<label for="" class="weui-label">入党时间</label>
		</div>
		<div class="weui-cell__bd">
			<input type="text" id="join_date" class="weui-input" placeholder="点击选择日期">
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">入党地点</label></div>
		<div class="weui-cell__bd">
			<input type="text" class="weui-input" placeholder="请输入入党地点" />
		</div>
	</div>
</div>
<div class="weui-flex flex_padding">
	<div class="weui-flex__item">
		<a href="javascript:;" onclick="reg_click()" class="weui-btn weui-btn_primary">注册</a>
	</div>
	<div class="weui-flex__item">
		<a href="${path}/app/login" class="weui-btn weui-btn_plain-default">登录页面</a>
	</div>
</div>

<#include "/layout/footer.ftl" />